﻿using System.Threading;
using System.Threading.Tasks;

namespace Xms.Abp.Core;

public interface ISerialNumberGenerator
{
    Task<long> CreateAsync(string key, int quantity = 1, string tenantId = null, SerialNumberGrowthType growthType = SerialNumberGrowthType.None, CancellationToken cancellationToken = default);
}

public interface ISerialNumberGenerator<T>
    where T : class
{
    Task<long> CreateAsync(int quantity = 1, string tenantId = null, CancellationToken cancellationToken = default);
}
